Skip to content

Driver for ST7735S #55

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jan 5, 2020
Merged

Driver for ST7735S #55

merged 5 commits into from
Jan 5, 2020

Conversation

philippkeller
Copy link
Contributor

I got a Waveshare 1.8inch LCD module which follows the ST7735S standard. As neither ST7735 nor ST7735R worked for me, I transferred the needed control commands from the example code I got with the module into this project.

I run it on my Raspberry pi like this:

import busio
import digitalio
from board import SCK, MOSI, CE0, D24, D25, D27
from PIL import Image, ImageDraw

from adafruit_rgb_display import color565
import adafruit_rgb_display.st7735 as st7735

# Setup SPI bus using hardware SPI:
spi = busio.SPI(clock=SCK, MOSI=MOSI)

# Create the ST7735S display:
display = st7735.ST7735S(spi, cs=digitalio.DigitalInOut(CE0),
                          dc=digitalio.DigitalInOut(D25),
                          rst=digitalio.DigitalInOut(D27),
                          bl=digitalio.DigitalInOut(D24),
                          width=160,height=128,x_offset=1,y_offset=2,
                          )

display.fill(color565(0,0,0))
display.pixel(50, 50, color565(255, 0, 0))

Wiring:

  • 3.3V (violet) -> 3.3V
  • GND (white) -> GND
  • DIN (green) -> MOSI (GPIO 10)
  • CLK (orange) -> SCLK (GPIO12)
  • CS (yellow) -> CE0 (GPIO8)
  • DC (blue) -> GPIO25
  • RST (black) -> GPIO27
  • BL (red) -> GPIO24

@ladyada ladyada requested a review from makermelissa January 5, 2020 16:45
Copy link
Collaborator

@makermelissa makermelissa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great! I don't have a 1.8" Waveshare display, so this hasn't been tested by me, but it sure won't break anything. :)

@makermelissa makermelissa merged commit 3a823a4 into adafruit:master Jan 5, 2020
adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Jan 7, 2020
Updating https://github.com/adafruit/Adafruit_CircuitPython_RGB_Display to 3.8.1 from 3.8.0:
  > Merge pull request adafruit/Adafruit_CircuitPython_RGB_Display#56 from makermelissa/master
  > Merge pull request adafruit/Adafruit_CircuitPython_RGB_Display#55 from philippkeller/master
  > Merge pull request adafruit/Adafruit_CircuitPython_RGB_Display#53 from adafruit/dherrada-patch-1

Updating https://github.com/adafruit/Adafruit_CircuitPython_MiniMQTT to 1.1.6 from 1.1.5:
  > Merge pull request adafruit/Adafruit_CircuitPython_MiniMQTT#19 from jerryneedell/jerryn_clientid
  > disabling pypi deploy via actions
  > Merge pull request adafruit/Adafruit_CircuitPython_MiniMQTT#17 from adafruit/dherrada-patch-1
  > Merge pull request adafruit/Adafruit_CircuitPython_MiniMQTT#13 from adafruit/dherrada-patch-1

Updating https://github.com/adafruit/Adafruit_CircuitPython_MotorKit to 1.3.2 from 1.3.1:
  > Merge pull request adafruit/Adafruit_CircuitPython_MotorKit#19 from adafruit/ladyada-patch-1
  > Merge pull request adafruit/Adafruit_CircuitPython_MotorKit#22 from adafruit/dherrada-patch-1
  > Merge pull request adafruit/Adafruit_CircuitPython_MotorKit#21 from adafruit/dherrada-patch-1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants